module Skit
  module Statsd
    class Configuration
      attr_accessor :host, :port, :namespace
      def initialize
        @host = 'localhost'
        @port = 8125
        @namespace = nil
      end

      def validate!
        raise ArgumentError, 'No namespace set' if @namespace.nil?
      end

      def configure!(environment)
        Skit::Statsd::Client.new(@host, @port, @namespace, environment)
      end
    end
  end
end
